<?php

class Playback extends CI_Controller{
	
	var $data;
	
	function __construct(){
		parent::__construct();
		
		$this->load->model('menu_model');
		$this->data['menuitems'] = $this->menu_model->menuitems;
		$this->data['isLoggedIn'] = $this->user_model->isLoggedIn();
		//print_r($this->data['menuitems']);
	}
	
	function index(){
		$this->home();
	}
	
	function home(){
		
		$this->data['articles'] = $this->articles_model->getAllArticles();
		
		$this->data['main_content'] =  'home';
		$this->data['selected_item'] = $this->menu_model->getMenuItem('home');
		$this->load->view('includes/template', $this->data);
	}
	
	function project_info(){
		$this->data['main_content'] =  'playback_project_info_view';
		$this->data['selected_item'] = $this->menu_model->getMenuItem('project_info');
		$this->load->view('includes/template', $this->data);
	}
	
	function _articles(){
		$this->data['main_content'] =  'articles_view';
		$this->data['selected_item'] = $this->menu_model->getMenuItem('articles');
		$this->load->view('includes/template', $this->data);
	}
	
	function _menu_test(){
		$this->load->view('menu_test');
	}
}
